@fn1
@fn2(20)
class MyClass {
    @readonly message = 'hello, world'
    @noEnumerable bar = '11111'

    @noEnumerable test () {
        console.log('test');
    }
}

function fn1 (target) {
    target.foo = 'hello';
}

function fn2 (value) {
    return function (target) {
        target.count = value;
    };
}

function readonly (target, name, descriptor) {
    console.log(target, name, descriptor);
    // target: 目标类的prototype
    // name: 目标属性
    // descriptor: 描述
    descriptor.writable = false;
}

function noEnumerable (target, name, descriptor) {
    descriptor.enumerable = false;
}

// console.log(MyClass.foo);
// console.log(MyClass.count);
const m = new MyClass();
// m.message = '1111';
// console.log(m.message);

for (const key in m) {
    console.log(m[key]);
}

m.test();
